<script>
import MyStudent from './components/MyStudent.vue'
import MyCar from "./components/MyCar.vue";

export default {
  name: 'App',
  components:{
    MyStudent,
    MyCar
  },
  methods:{
    getDom(){
      console.log(this.$refs.tupian)
      console.log(this.$refs.title)
      console.log(this.$refs.stu)
      console.log(this.$refs.car)
      console.log(document.getElementById("1"))
    }
  }
}
</script>

<template>
  <div>
    <img ref="tupian" alt="Vue logo" src="./assets/logo.png">
    <h1 ref="title">欢迎进入Vue脚手架环节</h1>
    <MyStudent ref="stu"></MyStudent>
    <MyCar ref="car" id = "1"></MyCar>
    <button @click="getDom" ref="brt"> 点我获取元素的dom对象</button>
  </div>
</template>
